converted into another compressed numerical value by a mathematical
function.
A hash algorithm is a mathematical function that transforms any input into
a fixed size output. The hash function needs to be collision-resistant to be
cryptographically secure and usable in blockchain technology, meaning that
it is difficult to find two inputs that produce the same output.
The values returned by a hash function are Message Digest or Hash
Values. An enormous volume of data, at least double the size of the original
information, is produced by the hash function and is slow.
The addition of a one-way * * in the process is an improvement to this
scheme. A variable-length input, say, a message of any length, even
millions of bits, is taken by a one-way hash function, and it produces a
fixed-length output, say, of 160 bits. An entirely different output value is
produced if the information is changed in any way, even by j ust one bit, and
this is ensured by the hash function.
The following properties are needed by a hash function to accomplish this:
One-way: It is possible to go from input to output in a hash function
but not vice-versa. This makes it possible to reverse engineer a
collision from the desired hash output.
Large output space: The only way to find a hash collision is via a
brute-force search which, according to the pigeon-hole principle,
requires checking as many inputs as the hash function has possible
outputs. To make a brute force search infeasible, this number should
be large enough.
Non-locality: Similar inputs produce very dissimilar outputs in a non-
local hash function. This is important to protect against hill-climbing
attacks.
A hash algorithm is considered secure until it is possible to find a
collision for it. Once this has occurred, it is officially deprecated, such
as MD5 and SHA-1.
Cryptographic hash function properties impact the security of password
storage.
A good hash should make it very hard to reconstruct the original
password from the output or hash, i.e., non-reversibility.